package com.amgl.mobike.base;

import android.support.v7.widget.RecyclerView;
import android.view.View;

public abstract class BaseViewHolder<T> extends RecyclerView.ViewHolder {
    protected int mPosition;
    protected T mData;

    public BaseViewHolder(View itemView) {
        super(itemView);
    }

    public void bindData(T data, int position) {
        this.mData = data;
        this.mPosition = position;
        showData(data);
    }

    protected abstract void showData(T data);
}